Optimal. Leaf size=71 \[ \frac{3}{8} \sqrt{\frac{\pi }{2}} \text{FresnelC}\left (\sqrt{\frac{2}{\pi }} x\right )-\frac{1}{24} \sqrt{\frac{\pi }{6}} \text{FresnelC}\left (\sqrt{\frac{6}{\pi }} x\right )+\frac{1}{6} x \cos ^3\left (x^2\right )-\frac{1}{2} x \cos \left (x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0532944, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {3403, 3385, 3352} \[ \frac{3}{8} \sqrt{\frac{\pi }{2}} \text{FresnelC}\left (\sqrt{\frac{2}{\pi }} x\right )-\frac{1}{24} \sqrt{\frac{\pi }{6}} \text{FresnelC}\left (\sqrt{\frac{6}{\pi }} x\right )-\frac{3}{8} x \cos \left (x^2\right )+\frac{1}{24} x \cos \left (3 x^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3403
Rule 3385
Rule 3352
Rubi steps
\begin{align*} \int x^2 \sin ^3\left (x^2\right ) \, dx &=\int \left (\frac{3}{4} x^2 \sin \left (x^2\right )-\frac{1}{4} x^2 \sin \left (3 x^2\right )\right ) \, dx\\ &=-\left (\frac{1}{4} \int x^2 \sin \left (3 x^2\right ) \, dx\right )+\frac{3}{4} \int x^2 \sin \left (x^2\right ) \, dx\\ &=-\frac{3}{8} x \cos \left (x^2\right )+\frac{1}{24} x \cos \left (3 x^2\right )-\frac{1}{24} \int \cos \left (3 x^2\right ) \, dx+\frac{3}{8} \int \cos \left (x^2\right ) \, dx\\ &=-\frac{3}{8} x \cos \left (x^2\right )+\frac{1}{24} x \cos \left (3 x^2\right )+\frac{3}{8} \sqrt{\frac{\pi }{2}} C\left (\sqrt{\frac{2}{\pi }} x\right )-\frac{1}{24} \sqrt{\frac{\pi }{6}} C\left (\sqrt{\frac{6}{\pi }} x\right )\\ \end{align*}
Mathematica [A] time = 0.0672248, size = 63, normalized size = 0.89 \[ \frac{1}{144} \left (27 \sqrt{2 \pi } \text{FresnelC}\left (\sqrt{\frac{2}{\pi }} x\right )-\sqrt{6 \pi } \text{FresnelC}\left (\sqrt{\frac{6}{\pi }} x\right )+6 x \left (\cos \left (3 x^2\right )-9 \cos \left (x^2\right )\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 58, normalized size = 0.8 \begin{align*} -{\frac{3\,x\cos \left ({x}^{2} \right ) }{8}}+{\frac{3\,\sqrt{2}\sqrt{\pi }}{16}{\it FresnelC} \left ({\frac{x\sqrt{2}}{\sqrt{\pi }}} \right ) }+{\frac{x\cos \left ( 3\,{x}^{2} \right ) }{24}}-{\frac{\sqrt{2}\sqrt{\pi }\sqrt{3}}{144}{\it FresnelC} \left ({\frac{\sqrt{2}\sqrt{3}x}{\sqrt{\pi }}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.52743, size = 131, normalized size = 1.85 \begin{align*} \frac{1}{24} \, x \cos \left (3 \, x^{2}\right ) - \frac{3}{8} \, x \cos \left (x^{2}\right ) + \frac{1}{1152} \, \sqrt{\pi }{\left (\left (2 i - 2\right ) \, \sqrt{3} \sqrt{2} \operatorname{erf}\left (\sqrt{3 i} x\right ) - \left (2 i + 2\right ) \, \sqrt{3} \sqrt{2} \operatorname{erf}\left (\sqrt{-3 i} x\right ) - \left (27 i - 27\right ) \, \sqrt{2} \operatorname{erf}\left (\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} x\right ) - \left (27 i + 27\right ) \, \sqrt{2} \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} x\right ) + \left (27 i + 27\right ) \, \sqrt{2} \operatorname{erf}\left (\sqrt{-i} x\right ) - \left (27 i - 27\right ) \, \sqrt{2} \operatorname{erf}\left (\left (-1\right )^{\frac{1}{4}} x\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.18939, size = 200, normalized size = 2.82 \begin{align*} \frac{1}{6} \, x \cos \left (x^{2}\right )^{3} - \frac{1}{2} \, x \cos \left (x^{2}\right ) - \frac{1}{144} \, \sqrt{6} \sqrt{\pi } \operatorname{C}\left (\frac{\sqrt{6} x}{\sqrt{\pi }}\right ) + \frac{3}{16} \, \sqrt{2} \sqrt{\pi } \operatorname{C}\left (\frac{\sqrt{2} x}{\sqrt{\pi }}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 4.98922, size = 116, normalized size = 1.63 \begin{align*} - \frac{15 x \cos{\left (x^{2} \right )} \Gamma \left (\frac{5}{4}\right )}{32 \Gamma \left (\frac{9}{4}\right )} + \frac{5 x \cos{\left (3 x^{2} \right )} \Gamma \left (\frac{5}{4}\right )}{96 \Gamma \left (\frac{9}{4}\right )} + \frac{15 \sqrt{2} \sqrt{\pi } C\left (\frac{\sqrt{2} x}{\sqrt{\pi }}\right ) \Gamma \left (\frac{5}{4}\right )}{64 \Gamma \left (\frac{9}{4}\right )} - \frac{5 \sqrt{6} \sqrt{\pi } C\left (\frac{\sqrt{6} x}{\sqrt{\pi }}\right ) \Gamma \left (\frac{5}{4}\right )}{576 \Gamma \left (\frac{9}{4}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.10356, size = 131, normalized size = 1.85 \begin{align*} \left (\frac{1}{576} i + \frac{1}{576}\right ) \, \sqrt{6} \sqrt{\pi } \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{6} x\right ) - \left (\frac{1}{576} i - \frac{1}{576}\right ) \, \sqrt{6} \sqrt{\pi } \operatorname{erf}\left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{6} x\right ) - \left (\frac{3}{64} i + \frac{3}{64}\right ) \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} x\right ) + \left (\frac{3}{64} i - \frac{3}{64}\right ) \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} x\right ) + \frac{1}{48} \, x e^{\left (3 i \, x^{2}\right )} - \frac{3}{16} \, x e^{\left (i \, x^{2}\right )} - \frac{3}{16} \, x e^{\left (-i \, x^{2}\right )} + \frac{1}{48} \, x e^{\left (-3 i \, x^{2}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]